package com.data.hive.controller.hive;

import com.data.hive.dao.TableInfo;
import com.data.hive.service.impl.MetaServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * meta
 *
 * @author andy
 * @version 1.0
 * @date 2022-01-17 9:56 上午
 */
@RestController
@Slf4j
public class MetaController {

    @Autowired
    private MetaServiceImpl metaService;

    @GetMapping(value = "/meta/tbls")
    @ResponseBody
    public List<TableInfo> getAllTables() {
        return metaService.allTBls();
    }
}
